﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AutoInsurance
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String s1 = Convert.ToString(Session["login"]);
            if (s1 == "")
            {
                Button1.Visible = false;
                HyperLink1.Visible = true;
            }
            else
            {
                Button1.Visible = true;
                HyperLink1.Visible = false;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session.Remove("login");
            Session.Remove("role");
            Session.Remove("name");
            Session.Remove("surname");
            Server.Transfer("Auth.aspx");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Server.Transfer("Auth.aspx");
        }
    }
}
